package com.dongdongshop.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer;

@Configuration
public class MyFreemarkerConfig {
    @Bean
    public FreeMarkerConfigurer freeMarkerConfigurer(){
        FreeMarkerConfigurer configurer =new FreeMarkerConfigurer();
        //第二步
        configurer.setDefaultEncoding("utf-8");
        //第三部
        configurer.setTemplateLoaderPath("classpath:freemarker");
        return configurer;
    }
}
